#ifndef IIC_H
#define IIC_H

#define I2C_Port GPIOE
#define I2C_SCL_Pin GPIO_PIN_1
#define I2C_SDA_Pin GPIO_PIN_2
#define I2C_DELAY 2
#define ACK  0
#define NACK 1

void iic_init();
void iic_write_start();
void iic_write_stop();
void iic_write_bit(uint8_t bit);
uint8_t iic_write(uint8_t addr, uint8_t reg, uint8_t* data, uint8_t size);
uint8_t iic_read(uint8_t addr, uint8_t reg, uint8_t* data, uint8_t size);

#endif